var locat = (window.location+'').split('/'); 
$(function()
{
	locat = window.location.protocol + "//" + window.location.host
	
});
function menu(option){
	
	var defaultOption = {
			url : locat+'/backend/menupopup/list',
			title: "菜单编辑",
			width:720,
			height:390
	}
	var actual = $.extend({},defaultOption,option||{});
	 var diag = new top.Dialog();
	 diag.Drag=true;
	 diag.Title =actual.title;
	 diag.URL = actual.url;
	 diag.Width = actual.width;
	 diag.Height = actual.height;
	 diag.CancelEvent = function(){ //关闭事件
		diag.close();
	 };
	 diag.show();
	 
}

function rolemenu(option){
	var defaultOption = {
			url : locat+'/backend/menupopup/toAssignMenu',
			title: "菜单编辑",
			width:300,
			height:450
	}
	var actual = $.extend({},defaultOption,option||{});
	
	var diag = new top.Dialog();
	 diag.Drag=true;
	 diag.Title =actual.title;
	 diag.URL = actual.url;
	 diag.Width = actual.width;
	 diag.Height = actual.height;
	 diag.CancelEvent = function(){ //关闭事件
		diag.close();
	 };
	 diag.show();
}

//清除加载进度
function hangge(){
	$("#jzts").hide();
}

//显示加载进度
function jzts(){
	$("#jzts").show();
}